from flask import Flask,redirect,url_for

app = Flask(__name__)
'''
@app.route('/index')
def index():
    return redirect('https://www.baidu.com')
'''

@app.route('/index')
def index():
    return redirect(url_for('hello'))

@app.route('/')
def hello():
    return 'this is hello func'

if __name__  == '__main__':
    app.run(debug=True, port=8002, host='0.0.0.0')